﻿namespace Entity;

/// <summary>
/// 物流表
/// </summary>
public class Express : BaseEntity
{
    /// <summary>
    /// 用户编号
    /// </summary>
    public int UserId { get; set; }

    /// <summary>
    /// 商户编号
    /// </summary>
    public int StoreId { get; set; }

    /// <summary>
    /// 快递单号
    /// </summary>
    public string ExpressCode { get; set; } = "";

    /// <summary>
    /// 收货地址编号
    /// </summary>
    public int AddressId { get; set; }

    /// <summary>
    /// 收货地址信息
    /// </summary>
    [Navigate(NavigateType.OneToOne, nameof(AddressId))]
    public Entity.ClientAddress? AddressInfo { get; set; }

    /// <summary>
    /// 快递状态
    /// </summary>
    public ExpressState ExpressState { get; set; } = ExpressState.待发货;

    /// <summary>
    /// 快递公司
    /// </summary>
    public string? CompanyName { get; set; }
}

/// <summary>
/// 快递状态
/// </summary>
public enum ExpressState
{
    待发货,

    配送中,

    确认收货,
}
